import {rand, randBoolean, randEmail, randNumber, randPhoneNumber, randWord} from '@ngneat/falso';
import type {OptionData} from '@libs/ReportUtils';
import CONST from '@src/CONST';

export default function createRandomOptionData(index: number): OptionData {
    return {
        login: randEmail(),
        searchText: randWord(),
        reportID: `report_${index}`,
        text: randWord(),
        alternateText: randWord(),
        tooltipText: randWord(),
        keyForList: `option_${index}`,
        descriptiveText: randWord(),
        isUnread: randBoolean(),
        isPinned: randBoolean(),
        isSelected: randBoolean(),
        phoneNumber: randPhoneNumber(),
        policyName: randWord(),
        policyID: `policy_${index}`,
        accountID: randNumber(),
        private_isArchived: new Date().toISOString(),
        isPolicyExpenseChat: randBoolean(),
        chatType: rand(Object.values(CONST.REPORT.CHAT_TYPE)),
        hasOutstandingChildRequest: randBoolean(),
        isOwnPolicyExpenseChat: randBoolean(),
        lastMessageText: randWord(),
        lastVisibleActionCreated: new Date().toISOString(),
        lastReadTime: new Date().toISOString(),
        lastReadSequenceNumber: randNumber(),
        lastMentionedTime: randBoolean() ? new Date().toISOString() : null,
        notificationPreference: rand(Object.values(CONST.REPORT.NOTIFICATION_PREFERENCE)),
        oldPolicyName: randWord(),
        hasParentAccess: randBoolean(),
        description: randWord(),
        isDeletedParentAction: randBoolean(),
        reportName: randWord(),
        chatReportID: `chatReport_${index}`,
        stateNum: rand(Object.values(CONST.REPORT.STATE_NUM)),
        statusNum: rand(Object.values(CONST.REPORT.STATUS_NUM)),
        type: rand(Object.values(CONST.REPORT.TYPE)),
        visibility: rand(Object.values(CONST.REPORT.VISIBILITY)),
        isCancelledIOU: randBoolean(),
        iouReportID: `iou_${index}`,
        currency: randWord(),
        isWaitingOnBankAccount: randBoolean(),
        lastVisibleActionLastModified: new Date().toISOString(),
        lastActorAccountID: randNumber(),
        ownerAccountID: randNumber(),
    };
}
